// 申请状态映射
export const statusLabelMap: Record<string, string> = {
  REVIEWING: '审核中',
  APPROVED: '已通过',
  REJECTED: '已拒绝',
  PENDING_ALLOCATION: '待分配',
  ALLOCATED: '已分配',
  COMPLETED: '已完成',
  CANCELLED: '已取消'
}

export const statusTagTypeMap: Record<string, string> = {
  REVIEWING: 'info',
  APPROVED: 'success',
  REJECTED: 'danger',
  PENDING_ALLOCATION: 'warning',
  ALLOCATED: 'primary',
  COMPLETED: 'info',
  CANCELLED: ''
}

// 申请类型映射
export const applicationTypeLabelMap: Record<string, string> = {
  TEACHING: '教学',
  EXAM: '考试',
  LAB: '实验',
  MEETING: '会议',
  OTHER: '其他'
}

export const applicationTypeTagMap: Record<string, string> = {
  TEACHING: 'primary',
  EXAM: 'warning',
  LAB: 'success',
  MEETING: 'info',
  OTHER: ''
}

// 教室类型映射
export const classroomTypeLabelMap: Record<string, string> = {
  NORMAL: '普通',
  LAB: '实验室',
  LECTURE: '讲堂',
  MULTIMEDIA: '多媒体',
  EXAM: '考场'
}

// 操作类型映射
export const operationTypeLabelMap: Record<string, string> = {
  SUBMIT: '提交申请',
  APPROVE: '审批通过',
  REJECT: '审批拒绝',
  ALLOCATE: '分配教室',
  CANCEL: '取消申请',
  COMPLETE: '完成使用'
}

export const operationTypeTagMap: Record<string, string> = {
  SUBMIT: 'primary',
  APPROVE: 'success',
  REJECT: 'danger',
  ALLOCATE: 'warning',
  CANCEL: 'info',
  COMPLETE: 'success'
}

// 工具函数
export function getStatusLabel(status: string): string {
  return statusLabelMap[status] || status
}

export function getStatusTag(status: string): string {
  return statusTagTypeMap[status] || ''
}

export function getApplicationTypeLabel(type: string): string {
  return applicationTypeLabelMap[type] || type
}

export function getApplicationTypeTag(type: string): string {
  return applicationTypeTagMap[type] || ''
}

export function getClassroomTypeLabel(type: string): string {
  return classroomTypeLabelMap[type] || type
}

export function getOperationLabel(operationType: string): string {
  return operationTypeLabelMap[operationType] || operationType
}

export function getOperationTag(operationType: string): string {
  return operationTypeTagMap[operationType] || 'primary'
} 